//
//  connect.h
//  ttsdktestapp
//
//  Created by wangna on 14-12-25.
//  Copyright (c) 2014年 wangna. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "owner.h"
#import "group.h"

@protocol SDKConnectDelegate <NSObject>

- (void) onLogin:(int32_t)result;
- (void) onCreateGroup:(int32_t)result group:(SDKGroup *)group;
- (void) onJoinGroup:(int32_t)result group:(SDKGroup *)group;
- (void) onExitGroup:(int32_t)result groupid:(uint64_t)groupid;

@end

@interface SDKConnect : NSObject

@property (strong, retain) SDKOwner *sdk_owner;

- (id)initWithObj:(id)connect;
- (void) setDelegate:(id)delegate;
- (bool) doLogin:(uint64_t) userid token:(NSString *)token srcid:(uint32_t)srcid;
- (BOOL) createGroup;
- (BOOL) joinGroup:(uint64_t)groupid;
- (BOOL) exitGroup:(uint64_t)groupid;

@end
